local skill = fk.CreateSkill{
  name = "#lvshi__bright_armor_skill",
  attached_equip = "lvshi__bright_armor",
  tags = {Skill.Compulsory},
}
skill:addEffect(fk.TargetConfirming, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    if target ~= player or not player:hasSkill(skill.name) then return false end
    local names = {"fire__slash", "thunder__slash", "ice__slash", "bright__slash", "fire_attack", "unexpectation", "rockfall"}
    return table.find(names, function (name) return string.find(data.card.name, name) end)
  end,
  on_use = function(self, event, target, player, data)
    data:cancelTarget(player)
    if data.card.name == "bright__slash" then
      data:addTarget(data.from)
    end
    --return true
  end
})
skill:addEffect(fk.BeforeChainStateChange, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skill.name) and not player.chained
  end,
  on_use = function (self, event, target, player, data)
    data.prevented = true
  end,
})

return skill